#property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Red #property indicator_color2 Lime #property indicator_color3 Blue //---- buffers double Buffer1[]; double Buffer2[]; double Buffer3[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { SetIndexStyle(0,DRAW_LINE, EMPTY, 2); SetIndexBuffer(0,Buffer1); SetIndexLabel(0,"14"); SetIndexStyle(1,DRAW_LINE, EMPTY, 2); SetIndexBuffer(1,Buffer2); SetIndexLabel(1,"30"); SetIndexStyle(2,DRAW_LINE, EMPTY, 2); SetIndexBuffer(2,Buffer3); SetIndexLabel(2,"50"); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for(int i=0; i